<script type="text/javascript">
function onSave() {
// 	alert($("input[name='optionsRadios']:radio:checked").val());
	var selectValue = $("input[name='optionsRadios']:radio:checked").val();
	$.ajax({
		type : "get",
		url : window.location.pathname+"/save",
		data : {select : selectValue},
		traditional: true,
		dataType : "json",
		success : function(json) {
			var failArr = json["failArr"]
			if (failArr.length == 0) {
				common.showTip({
					title : "提示",
					text : "执行成功"
				});
			} else {
				var result = "";
				$.each(failArr, function(index, osdName) {
					result += osdName;
					result += ", "
                });
// 				alert(result);
				common.showTip({title : "提示", text : result + "执行失败,可尝试重新执行操作"});
			}
		}
	});
// 	$.get(window.location.pathname+"/save", { select: selectValue }, function (text, status) { alert(text); });
}
</script>

<div class="radio">
   <label>
      <input type="radio" name="optionsRadios" value="client_first" checked> 
                  <@spring.message code='refactor.businessData'/>
   </label>
</div>
<div class="radio">
   <label>
      <input type="radio" name="optionsRadios" value="balance">
                 <@spring.message code='refactor.balanced'/>
   </label>
</div>
<div class="radio">
   <label>
      <input type="radio" name="optionsRadios" value="backfill_first ">
                 <@spring.message code='refactor.dataRepairing'/>
   </label>
</div>

<a id="btn_save" class="btn btn-primary"
		href="javascript:void(0);" onclick="onSave();"><@spring.message code='button.save'/></a>